#ifndef SERVER_H
#define SERVER_H

#include <QTcpServer>
#include <QtNetwork>
#include <QObject>
#include "peer.h"

class Server : public QTcpServer
{
    Q_OBJECT

public:
    Server (QObject *parent = 0);
    bool startServer (const QString &serverAddress);
    bool stopServer (QVector <Peer *> &peers);

signals:
    void newConnection ();

public slots:

private slots:
//    void acceptConnection ();

private:
    quint16 port = 5560;
    Peer *host;
};

#endif // SERVER_H
